﻿using System.Diagnostics.Contracts;

namespace System.Reactive
{
	public sealed class AnonymousObserver<T> : ObserverBase<T>
	{
		public AnonymousObserver(Action<T> onNext)
		{
			Contract.Requires(onNext != null, null, "onNext != null");
		}

		public AnonymousObserver(Action<T> onNext, Action onCompleted)
		{
			Contract.Requires(onNext != null, null, "onNext != null");
			Contract.Requires(onCompleted != null, null, "onCompleted != null");
		}

		public AnonymousObserver(Action<T> onNext, Action<Exception> onError)
		{
			Contract.Requires(onNext != null, null, "onNext != null");
			Contract.Requires(onError != null, null, "onError != null");
		}

		public AnonymousObserver(Action<T> onNext, Action<Exception> onError, Action onCompleted)
		{
			Contract.Requires(onNext != null, null, "onNext != null");
			Contract.Requires(onError != null, null, "onError != null");
			Contract.Requires(onCompleted != null, null, "onCompleted != null");
		}

		protected override void Completed()
		{
		}

		protected override void Error(Exception error)
		{
		}

		protected override void Next(T value)
		{
		}
	}
}